<?
include("gestione/includes/config.inc.php");
include("gestione/includes/auth.lib.php");
include("gestione/includes/function.inc.php");
include("gestione/includes/product_new.class.php");
include("gestione/includes/e-commerce_new.class.php");
include("gestione/includes/news.class.php");
include("gestione/includes/content.class.php");
include("gestione/includes/keywords.class.php");
include("gestione/includes/class.xml.php");
$lang = "ita";
####################### TOYS #######################################################
$cid = 689;
$tiponews = "piscine";
$titvetrina = "tit-articoli-piscine-vetrina.gif";
$titcontent = "bkgTitCnt_piscine.gif";
$tipobanner = "piscine";
$titprodotti = '<img src="/images/titoli/tit-prodotti-piscine.gif" width="240" height="55">';
$titnovita = '<img src="/images/titoli/tit-novita-piscine.gif" width="200" height="55">';
$logo = '<img src="/images/loghi/bs-piscine.gif" width="99" height="100">';
$bgcolor = '#00A6E9';
####################### SESSION ##############################################################
$newSession = new websession();
$strNumArt = '<span class="ajax_cart_no_product">(vuoto)</span>';
$str_tot = 0;
if($newSession->order != NULL) {
	$articoli = $newSession->order->getArticoli();
	$numArt = count($articoli);
	$tot = $newSession->order->getTotale($articoli);
	$tot=="" ? $str_tot = 0 : $str_tot = number_format($tot,2,",",".");
	if($numArt>0) {
		$numArt>1 ?
		$strNumArt = '<span class="ajax_cart_quantity">'.$numArt.'</span> <span class="ajax_cart_product_txt">prodotti</span>' : 
		$strNumArt = '<span class="ajax_cart_quantity">'.$numArt.'</span> <span class="ajax_cart_product_txt">prodotto</span>';
	} else 
		$strNumArt = '<span class="ajax_cart_no_product">(vuoto)</span>';
}
if($newSession->getStatus())  {
	$registrati = '<li id="your_account"><a href="/webproduct.php?op=profile" title="Il tuo Profilo">Il tuo Profilo</a></li>
	<li id="header_user_info">
		Welcome '.$newSession->webuser->ragione.',
					(&nbsp;<a href="/webproduct.php?op=logout">Log out</a>&nbsp;)
			</li>';
	$tablelogin = '';
} else {
	$registrati = '<li id="your_account">&nbsp;</li>
	<li id="header_user_info">
		Welcome,
					(&nbsp;<a href="/webproduct.php?op=register">Login</a>&nbsp;)
			</li>';
}
####################################################################################################
$id_user = 27;
$idtopics = $_GET['idtopic'];
if($idtopics == "")
 $idtopics = $_POST['idtopic'];
if($idtopics == "" || !isset($idtopics))
 $idtopics = 0;
 $op = $_GET['op'];
 if($op == "")
  $op = $_POST['op'];
$idpage = $_GET['idpage'];
if($idpage == "")
 $idpage = 0;
 //contenuto pagina
 if($idpage == "" && $idtopics != "")  {
   		$qry_p = "SELECT idpage FROM content WHERE idtopic='$idtopics' AND ordine='0';";
		$res_p = mysql_query($qry_p);
		list($idpage) = mysql_fetch_row($res_p);
 }  
	 $newContent = new content($idpage);
	 $content = $newContent->contenuto;
	 if($newContent->titolo != "")
	   $titolo = $newContent->titolo;
	 $tagtitle = $newContent->tagtitle;
	 $tagkey = $newContent->tagkey;
	 $tagdesc = $newContent->tagdesc;
	 $metatitle = $newContent->metatitle;
	 $metakey = $newContent->metakey;
	 $metadesc = $newContent->metadesc;
	 $hidden = $newContent->hidden;
	 $navbar = '<div class="breadcrumb"><a class="navbar" href="/index.php">Home</a> <span class="navigation-pipe">&gt;</span> '.$titolo.'</div>';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="it" xmlns="http://www.w3.org/1999/xhtml"><head>
<? include("includes/header.php") ?>
</head>
<body>
<!--[if lt IE 7]><div style='clear:both;height:59px;padding:0 15px 0 15px;position:relative;z-index:10000;text-align:center;'><a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"><img src="http://www.theie6countdown.com/images/upgrade.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /></a></div><![endif]-->
<div id="wrapper1">
<div id="wrapper2">
<div id="wrapper3">
	<!-- Header -->
<? include("includes/top.php")?>
	<div id="columns">
<!-- Left -->
<? include("includes/left.php")?>
<!-- Center -->
<div id="center_column" class="center_column">
<h1><?=$titolo?></h1>
<?=$navbar?>
<?=$content?>
</div>
		<div class="clearblock"></div>
	</div>
</div>
<!-- Footer -->
	<div id="footer_wrapper">
<? include("includes/footer.php")?>
	</div>
</div>
</div>
	</body></html>